vt-d: synchronize for Device-TLB flush one by one
authorQuan Xu <quan.xu@intel.com>
Tue, 28 Jun 2016 09:35:19 +0000 (11:35 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 28 Jun 2016 09:35:19 +0000 (11:35 +0200)
commita7f581ff451823f854359d85e1d1827eee59efda
tree2357eada1e4121a45b0f3742043593368b598a45
parentdca07f30021ca0840bd923f107d546301a5dba7a
vt-d: synchronize for Device-TLB flush one by one

Today we do Device-TLB flush synchronization after issuing flush
requests for all ATS devices belonging to a VM. Doing so however
imposes a limitation, i.e. that we can not figure out which flush
request is blocked in the flush queue list, based on VT-d spec.

To prepare correct Device-TLB flush timeout handling in next patch,
we change the behavior to synchronize for every Device-TLB flush
request. So the Device-TLB flush interface is changed a little bit,
by checking timeout within the function instead of outside of function.

Accordingly we also do a similar change for flush interfaces of
IOTLB/IEC/Context, i.e. moving synchronization into the function.
Since there is no user of a non-synced interface, we just rename
existing ones with _sync suffix.

Signed-off-by: Quan Xu <quan.xu@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/vtd/extern.h
xen/drivers/passthrough/vtd/qinval.c
xen/drivers/passthrough/vtd/x86/ats.c